Digital images are commonly used in several applications such as, for example, in digital still cameras (DSC). A digital image includes a matrix of elements, commonly referred to as a bit map. Each element of the matrix, which represents an elemental area of the image (a pixel or pel), is formed by several digital values indicating corresponding components of the pixel.
Digital images are typically subjected to a compression process to increase the number of digital images which can be stored simultaneously, such as to a memory of the camera. Moreover, this allows transmission of digital images, such as over the internet, for example, to be easier and less time consuming. A compression method commonly used in standard applications is the JPEG (Joint Photographic Experts Group) algorithm, described in CCITT T. 81, 1992.
In the JPEG algorithm, 8×8 pixel blocks are extracted from the digital image. Discrete cosine transform (DCT) coefficients are then calculated for the components of each block. The DCT coefficients are rounded off using corresponding quantization tables. The quantized DCT coefficients are encoded to obtain a compressed digital image, from which the corresponding original digital image may be later extracted by a decompression process.
In some applications, it is necessary to provide a substantially constant memory requirement for each compressed digital image, i.e., a compression factor control or CF-CTRL. This problem is particularly perceived in digital still cameras. In fact, in this case it must be ensured that a minimum number of compressed digital images can be stored in the memory of the camera to guarantee that a minimum number of photos can be taken by the camera.
The compression factor control is quite difficult in algorithms, such as the JPEG, wherein the size of the compressed digital image depends on the content of the corresponding original digital image. Generally, the compression factor is controlled by scaling the quantization tables using a multiplier coefficient (gain factor). The gain factor to obtain a target compression factor is determined using iterative methods. The compression process is executed several times, at least twice. The gain factor is modified according to the result of the preceding compression process, until the compressed digital image has a size that meets the target compression factor.
Current methods require a high computation time, so that they are quite slow. Moreover, these known methods require a considerable power consumption. This drawback is particularly acute when the compression method is implemented in a digital still camera or other portable devices which are powered by batteries.